package com.syas.dao.daos;

import com.syas.base.dao.daos.ChainEntityDao;
import com.syas.common.exception.EntityOperateException;
import com.syas.common.exception.ValidatException;
import com.syas.dao.interfaces.IAttendInfoDao;
import com.syas.model.models.AttendInfo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("AttendInfoDao")
public class AttendInfoDao extends ChainEntityDao<Integer, AttendInfo> implements IAttendInfoDao {
    //获取员工信息集合
    public List<AttendInfo> getAttendInfoList(String hql) {
        return (List<AttendInfo>)this.getSession().createQuery(hql).list();
    }
    //删除员工信息
    public void delete() throws EntityOperateException, ValidatException {
          String sql = " delete from AttendInfo ";
        this.getSession().createQuery(sql).executeUpdate();
    }
}
